Page 85 - 2629_Devagiri_C-8
P. 85

4.  The WHERE clause specifies the criteria according to which rows are retrieved.

                    5.  The DESCRIBE command is used to view the schema of an existing table.

                 D.  Answer the following questions:
                    1.  Define the SELECT command.



                    2.  What do you understand by operators?


                    3.  List any two constraints used in MySQL.





                    4.  Differentiate between primary key and foreign key.




                    5.  Explain the use of Where clause in SQL.




                                                                                                   21 st
                 COMPETENCY-BASED QUESTIONS                                                      Century   #Creativity
                                                                                                  Skills  #Critical Thinking
                 1.  Madhurima is working on her organisation’s database. She set a key on a column and now that column
                    does not accept duplicate or null values. Which type of key has she applied?
                 2.   Janvi made a table with states and capitals using SQL. She wants to display the capital

                    of a particular state. Which SQL clause should she use to set this condition?



                            LAB LEARNING                                               21 st   #Creativity
                                                                                      Century
                                                                                      Skills  #Technology Literacy
                        1.  Consider the following PLAYERS table:
                                                     Table: PLAYERS
                              Player_ID      Name          Sport        Country         Age
                                S001      Virat         Cricket       India             35
                                S002      Ronaldo       Football      Portugal          39
                                S003      Sindhu        Badminton     India             28
                                S004      Messi         Football      Argentina          37
                                S005      Mary          Boxing        India              41

                           Now, write SQL commands for the following:
                           (a)  Create a PLAYERS table under the Sports database.
                           (b)  Display details of all the Indian players.
                           (c)  Show the names of all the football players.

                           (d)  Change the country of player “Ronaldo” to “Brazil”.





                                                                                                                  83
                                                                                          MySQL: My First Database
   80   81   82   83   84   85   86   87   88   89   90